﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.ZilLionOss.Domain.Entitys
{
    public class OssCompanyInfoEntity
    {
        /// <summary>
        ///     纵联商城接入关键字
        /// </summary>
        [JsonProperty("zlcompanykey")]
        public string ZlcompanyKey { get; set; }

        /// <summary>
        ///     接入公司名称
        /// </summary>
        [JsonProperty("companyname")]
        public string CompanyName { get; set; }

        /// <summary>
        ///     操作人id
        /// </summary>
        [JsonProperty("updateid")]
        public long UpdateId { get; set; }

        /// <summary>
        ///     更新时间
        /// </summary>
        [JsonProperty("updatetime")]
        public DateTime UpdateTime { get; set; }
    }

    public class OssCompanyInfoMapper : ClassMapper<OssCompanyInfoEntity>
    {
        public OssCompanyInfoMapper()
        {
            Table("oss_company_info");
            Map(f => f.ZlcompanyKey).Column("zlcompanykey").Key(KeyType.Assigned);
            Map(f => f.CompanyName).Column("companyname");
            Map(f => f.UpdateId).Column("updateid");
            Map(f => f.UpdateTime).Column("updatetime");
        }
    }
}